from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from options import options
from time import sleep
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver=webdriver.Chrome(options=options)
driver.get(r'https://www.baidu.com/')
sleep(1)
# # 隐式等待
# driver.implicitly_wait(10)
# driver.find_element(By.ID,'hw').click()
#显式等待
ele=(By.ID,'kw')
WebDriverWait(driver,5,0.5).until(EC.visibility_of_element_located(ele))
WebDriverWait(driver,5,0.5).until(EC.presence_of_element_located)


